<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        nav {
            width: 960px;
            height: 40px;
            margin: 40px auto;
        }
        
        nav ul {
            list-style: none;
        }
        
        nav ul li {
            float: left;
            width: 120px;
            line-height: 40px;
        }
        
        ul li a {
            display: block;
            text-decoration: none;
            width: 120px;
            height: 40px;
            color: #fff;
            background-color: orange;
        }
        
        a:hover {
            border-top: 3px solid red;
            position: relative;
            bottom: 3px;
        }
    </style>
</head>

<body>
    <nav>
        <ul>
            <li>
                <a href="#">网站栏目</a>
            </li>
            <li>
                <a href="#">网站栏目</a>
            </li>
            <li>
                <a href="#">网站栏目</a>
            </li>
            <li>
                <a href="#">网站栏目</a>
            </li>
            <li>
                <a href="#">网站栏目</a>
            </li>
            <li>
                <a href="#">网站栏目</a>
            </li>
            <li>
                <a href="#">网站栏目</a>
            </li>
            <li>
                <a href="#">网站栏目</a>
            </li>
        </ul>



    </nav>

</body>

</html>